Changed some of the internals (a bit cleaner now :])