Some refactoring fun! ;)