Added much more work on theory and derivation, also began to sketch rough implementation