more code clean up in cycle js