Small error log changes
Some more documentation
Created function handler