Adding functional style exception handling, base operations and methods; still needs polishing.