Fixed bugs. Still errors in code.

Syntax OK