Removing all works

It sort of works and the code is real messy and complicated. Will create
a more understandable and general version