add validation, and cleanup non-buliding stuff