Updated GameObject class for functionality.
Added JavaDoc comment.