Cleaned up some linter warnings
Close open markers when a new one is opened