Overlay tested, should work now. did some refactoring too