Added field tabbing across ui tabs

Sorry for the almost complete rewrite. Most things didn't really change, but I wanted to really understand how this works (added more comments in the process to make future changes a bit easier). Also my OCD kicked in, so I made it JSLint compliant and adapted it to my usual module structure. Again, sorry... :)