Add ability to export single jar file for running on server; some refactoring