Removed unecessary db queries