cleaned up constructors and many other things