Added various improvements and fixes, added functionality of shifts