Bunch of improvements and bug fixes due to working with actual data