Cleaned code, improved naming