separated parsing and cleanup
cleaned up getStatements method