Moved some code from express to bootstrap file.