[#508] Use primitives for constants
[#363] Move adapt cluster data to task
[#363] Remove unused code