Improved build files and scripts