Re-worked logic

Split up classes