Develop

Moving refactored code back in master branch