Syntax

Clean up syntax and add debugging logs