Fixed syntax error and a few clean ups