Removed TODOs, improved documentation, fixed some validation issues