Updated for mass publication

Cleaned up files structure, moved many functions to gists, and cleaned
up some useless registers.