Some refactoring and a start on tweening