Some refactoring, and started work on the status box