add optimize option, more verbose, cleanup, add TODO
fix if syntax
fix if syntax again