Finished the take top/bottom X operation

Added tests to check for bad cases.

Also tweaked testing for struct type to be a tad cleaner. It helped out when I needed to re-use that to implement the new functionality