Refactored code
Added possible menu filtering