Removed an unnecessary function
Fixed a parseInt call