factored out stylesheet and some js
minor shuffling