Removed useless templates, added ApplyMask functions, added clik class