Implements and refactors laboratory module.