Moved code to fitbit manager and db file