added comments and cleanup to problems [1..5]