Major refactor & simlification