I kinda missed the second page, sorry. I had the tab open for too long.
And if you look over your code again, the last thing you posted still had a few things you missed, although you fixed the error in some other parts.
Also, if you post which errors you are getting, it might help us help you a little more.