Refactoring and markdown changes