Refactoring and port to latest version of bootstrap.