Cleaned code and added operation formatter.