Added comments
Added comments
Added more comments
Redirected errors to stderr