Bugs with memory and registers windows fixed, small optimizations were made