Minor changes, added rect math module