Overhaul config menu to make code easier to expand upon

This also fixes a few mistakes that resulted from trying to duplicated
the same code in three places for different options. This should
prevent future issues like that.
Another specific gitignore addition for generated class files