Design and performance improvements

#140, #139, #135