Added extension() function + test and did some cleanup
Added stem() func + tests & moved extension into .cc file