Completed primary and advanced task

Completed task and fixed some mistakes