Changed many id's types from long to int