cleaned up code a bit, fixed some tau issues