Improve names and add documentation