When posting code, please use highlight tags to preserve formatting. Also, use proper indentation to really highlight what's going on. You have a few things that look like this:


if(condition)...