a little clean up, added some docs, added a port option