Refactored version now working, complete with utilities class