Fixed

The code is a bit more sane