Moved all types to types file