Roll commands and reduction implemented. Also a general cleanup.