Task #510. Removed unused function, removed static from var