Bunch of feature enhancements and code separation