Cleanup of case syntax + preparation for new functionality.
Added new markdown functionality + some minor changes.