Change functionality so that after returns the value of the last applied after function. Removed conflicting tests and added a test