Updating main branch

Creating a pull request for commenting ability
use more typesafe constructs here.