Moved ternary hack into regular structure
Got rid of redundant adding of default return statement