Fix more warnings
Add rudimentary error handling
Update TODO for error handling
update errors