Added doc comments
Added comments
Added remaining comments and removed sort direction enum