Removed sentinels
Redistributed all code from the 'misc' section