Made build script more generic and added more targets