Re-factoring code to make sense...