Consistently use negative integers as error return codes.
Removed MCTApp.java (moved the global key map to Common.java).