cleaned up core ns, added tests for hex->dec conversion