few minor changes to builder and mainjs