Add unittest targets, add remaining enums, improve core functions etc