fix some broken windows

clean up js and html formatting
rearrange templates order
set address as session variable