Minor changes and now fully functional