Well I don't like this code either in that this makes similar logic to be scattered, also have no idea how this could be done nice at this moment.