removed unused constructors, merged flags into an int