Some additions and build fixes