Combined mix function.

Signed-off-by: Alex Cappiello <acappiel@andrew.cmu.edu>
Reindent again.

Signed-off-by: Alex Cappiello <acappiel@andrew.cmu.edu>