Refactored to use rake
update readme
Added guard