Refactoring and improved documentation page