Added Unit Testing

Unit tests for functions