Code cleanup and added base for calculator service