Added test for GitHub issue #50
Ignore generated sources
Partially fixed GitHub issue #50
Simplified code