Fixed an earlier 'fix'
Added a bunch of stuff. Ugly commit