Significantly cleaned up add() function.

add() function is now significantly sexier.