added linked list functionality

and other misc improvements