Buildscript improvements, still hacky