Updated Unit Tests & fixed Sec functionality