improve error handling
larger test map
fix memory leak
profiling support
fix math bug