Fix linking errors, reformatting types