Moved data and type decls to top