Addressed minor errors in code