Various changes / refactors