Adds typedefs to common namespace and fixes various types