Added initial unit tests. Fixed "root" bug in method naming.