Refactor code and add some bootstrap customization