restructured adn refactored code
Merge pull request #3 from hephcero/leap

restructured and refactored code