Build Improvements

The project can now be built and run properly from the command-line and
from IntelliJ.