Cleanup and some markdown refactoring