Finish logic and documentation