Fixed arguments bug
Removed redundant code