Fixed syntax error and cleaned up a little