add license info
Use vector instead of list
Don't check for null from new.

New doesn't return null and throws on its own'
Don't use unnecessary function prototypes