CLEANUP: cleaned some code

wrapped up some code, improvments in rl