Big refactoring. Use $.proxy instead context