Recreated previous functionality - Code refactor complete