Cleaned code and smoothed interface.