Re-worked database retrieval to be more efficient

Also added sensor controller and setup list method