New Layout

Layout changed and code simplified to use only native javascript.