Corrected errors
Added Single type
Added comments