Moved things around, put constants in the header.