Initial code revision. Old as heck.