Replace some pointers with references
Remove build dir