More modifications. Debugging in progress