re-written to do calculations in php. Should fix compatibility
variables initialized

aka commit of shame. should fix notice when php is in super picky mode
:)
Moved some stuff around on the dashboard close #29

I'm still not happy with the dashboard :-(