Added Warmup function, and some cosmetic changes.