Some fixes and styling

Variable scope and math are almost there; preliminary styling included;
unfinished stats section started