Rewrote header functions as inline, add toString to all objects

Remove trailing space.