Addition of all the right declarations, and some fixes