cleanup and fixed build