cleaned up constructors a bit
Fix handling ^d on input