Re-Write of Tests and Functions

Check and Add Tests Written