adding some flags and mutator functions, cleaning up headers