Make templates nicer, add encryption and compression