Code generation improved
Error handling improved