Moved code into its own class to continue working