Improve exception messages
Fixed modules management
Fixed templates generation