Added comments to solution and removed example functions