Debugged Code

I noticed that after some debugging there were errors in the code. Plus
there were some extra mysql_* queries.