added rebar and refactored directory layout