Refactor lots of things to allow for future expandability