Based on assignments on Stanford course CS193P iOS Programming