improved build script and simplified directory structure