Refactored code into lib
Added binary