More unit tests added - Cleaned up some redundant code