Implements #1 #2 #6 #20 #12