Added SUN, and did som refactoring
misc