fp automation v3

Code cleanup mainly(quite a bit of it).