Fixed and reorganized stuff