Cleaning up functions, fixing time string bug, relocating logs to logs/ directory