Improve build functions