Add all necessary stuff. Works well. Needs tests.