stripped extra brackets, added semi colons
removed unused vars