Fixed syntax error and missing imports