clean up build structure, fixed some smaller issues