Changed masks implementation. Now masks can turn!