Rewrote Unit Tests
Added functions