Rework 1

Rather big rework of everything.