Implemented add() and debugged previous methods

Should have used "NULL" instead of "null";