added more spaces to main.cpp, did some APD debugging on rebuild.cpp -- still doesn't necessarily work
merged