Added missing libraries, improved boilerplate