Added database functionality, refactored js
Updated some date showing...