added js functions. improved layout