Refactored code base to simplfy installation