Restarted from scratch, cleaner code and structure