More updates and re-factoring