Starting to fix function declarations to work with tables