javascript code optimization
changed to new bootstrap ui
fix typo
moving api part to "well" for consistency