Cleaned up the constructor a bit