improved build script
tweaked for mobile etc