Redesign/Refactoring sunappserver module + added spec tests