Added test functionality and some autonomous changes