Some re-factoring is inevitable :)