Refactored functions in views/marble