Added tests, some updates in class

Nothing will probably work right now, but i don't have enough time. Will
finish later