Closes #5: Moved some functionality from lib to bin.