moved some functions

There was lot of stuff in Core class which never really did belong there, I moved all this to places where it suits much better and doesn't cause such a mess in dependency tree