Cleaned up some types and syntax