Initial upload

Added plenty of comments.